package com.xiongwei.singleton;

/**
 * 懒汉式(静态内部类)
 *
 * 1.外部类的加载不会导致内部类的加载。保证了懒加载
 * 2.加载静态内部类时才，保证了线程安全
 */
public class LazyMan5 {

    private LazyMan5(){

    }

    private static class LazyMan5Inner{
        private static final LazyMan5 INSTANCE = new LazyMan5();
    }

    public static LazyMan5 getInstance(){
        return LazyMan5Inner.INSTANCE;
    }
}
